﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace Muel.TypeScriptFacade.Core
{
    internal static class CodeHelper
    {
        internal static string Clean(this string input)
        {
            string commentLinesRemoved = Regex.Replace(input, @"^\s*//.*$", string.Empty, RegexOptions.Multiline);
            string blankLinesRemoved = Regex.Replace(commentLinesRemoved, @"^\s*$\n", string.Empty, RegexOptions.Multiline).TrimEnd();
            return blankLinesRemoved;
        }
    }
}
